from utils.send_method import SendMethod
class Event:
    def __init__(self):
        self.url='http://127.0.0.1:8000'
    #新增发布会
    def add_event(self,body):
        method ='post'
        url =self.url+'/api/add_event/'
        return  SendMethod.send_method(method,url,data=body)
    #查询发布会
    def get_event(self,params):
        method='get'
        url=self.url+'/api/get_event_list/'
        return  SendMethod.send_method(method,url,params=params)


if __name__ == '__main__':
    body={
        "eid": '71',
        "name": "iPhone22发布会",
        "limit": '200',
        "status": "0",
        "address": "汤臣一品",
        "start_time": "2022-10-23"
    }
    # print(Event().add_event(body))
    params={
        "eid":'71'
    }
    print(Event().get_event(params))



